<?php
/**
 * PHP class representing a blip.
 * @author Omni Adams <omni@digitaldarkness.com>
 * @copyright 2009 Digital Darkness
 * @license Apache License, Version 2.0
 * @see http://code.google.com/p/phpify/
 * @package phpify
 */


/**
 * Wave class.
 * @author Omni Adams <omni@digitaldarkness.com>
 * @package phpify
 */
class Wave {
  /**
   * @var string Blip ID (like b+JXsIa88E5)
   */
  private $blip_id;


  /**
   * @var string Base64 encoded content of the blip
   */
  private $content;


  /**
   * @var string Email of the person that created the blip
   */
  private $creator;


  /**
   * @var string Title of the wave
   */
  private $title;


  /**
   * @var string Wave ID (like googlewave.com!w+iTU14BGGV)
   */
  private $wave_id;


  /**
   * Construct a wave.
   * @param string $id ID of the wave
   * @param string $title Title of the wave
   * @param string $creator Creator of the blip (email address)
   * @param string $content Content of the blip
   * @param string $blip_id Blip ID
   */
  public final function __construct($id, $title, $creator, $content, $blip_id) {
    $this->wave_id = $id;
    $this->title = $title;
    $this->creator = $creator;
    $this->content = $content;
    $this->blip_id = $blip_id;
  }


  /**
   * Return the ID of the wave.
   * @return string Wave ID
   */
  public final function GetWaveId() {
    return $this->wave_id;
  }


  /**
   * Return the Wave's title.
   * @return string Title of the wave
   */
  public final function GetTitle() {
    return $this->title;
  }


  /**
   * Return the blip's creator.
   * @return string Email address of the blip's creator
   */
  public final function GetCreator() {
    return $this->creator;
  }


  /**
   * Return the content of the blip.
   * @return string Content of the blip
   */
  public final function GetContent() {
    return base64_decode($this->content);
  }


  /**
   * Return the ID of the blip.
   * @return string ID of the blip
   */
  public final function GetBlipId() {
    return $this->blip_id;
  }
}
